int main() { Example e; std::cout << "End of main\n"; return 0; }
---
ОТВЕТ: Constructing t1 Constructing temp1 Constructing temp2 Inside constructor Constructing t2 End of main Destructing t2 Destructing temp2 Destructing temp1 Destructing t1
---
Почему так:
• Поля инициализируются в порядке объявления в структуре, а не в списке инициализации • std::initializer_list создаёт временные объекты, которые копируются в вектор • t2 создаётся после строки Inside constructor • Деструкторы вызываются в обратном порядке: t2 → temp2 → temp1 → t1
Хитрость — в порядке инициализации, временных объектах и destructuring-порядке!
int main() { Example e; std::cout << "End of main\n"; return 0; }
---
ОТВЕТ: Constructing t1 Constructing temp1 Constructing temp2 Inside constructor Constructing t2 End of main Destructing t2 Destructing temp2 Destructing temp1 Destructing t1
---
Почему так:
• Поля инициализируются в порядке объявления в структуре, а не в списке инициализации • std::initializer_list создаёт временные объекты, которые копируются в вектор • t2 создаётся после строки Inside constructor • Деструкторы вызываются в обратном порядке: t2 → temp2 → temp1 → t1
Хитрость — в порядке инициализации, временных объектах и destructuring-порядке!
Telegram’s stand out feature is its encryption scheme that keeps messages and media secure in transit. The scheme is known as MTProto and is based on 256-bit AES encryption, RSA encryption, and Diffie-Hellman key exchange. The result of this complicated and technical-sounding jargon? A messaging service that claims to keep your data safe.Why do we say claims? When dealing with security, you always want to leave room for scrutiny, and a few cryptography experts have criticized the system. Overall, any level of encryption is better than none, but a level of discretion should always be observed with any online connected system, even Telegram.
For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.